home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Menus / Low Level / MenuBarObject.cp next >
Encoding:
Text File  |  1997-06-28  |  430 b   |  21 lines  |  [TEXT/CWIE]

  1. // MenuBarObject.cp
  2.  
  3. #ifndef MenuBarObject_h
  4. #include "MenuBarObject.h"
  5. #endif
  6.  
  7. MenuResult MenuBarObject::Key( ::Key key )
  8.   {
  9.     MenuResult result = MenuKey( key.Character() );
  10.     if ( !result.Null() )
  11.         return result;
  12.     
  13.     KCHRCache *kchr = Key::GetKCHRCache();
  14.     
  15.     result = MenuKey( Byte0( key.WithModifiers( 0, kchr ) ) );
  16.     if ( !result.Null() )
  17.         return result;
  18.  
  19.     return MenuKey( Byte0( key.WithModifiers( shiftKey, kchr ) ) );
  20.   }
  21.